**** Project: The Way She Moves: Political Repositioning and Gender Stereotypes
**** Author: Maurits J. Meijers
**** Journal: Journal of Experimental Political Science
**** Date: December 5, 2023

import spss using "data.sav", case(lower)

**********************************************
************ DATA MANAGEMENT *****************
**********************************************

* Create Gender Treatment Variable
gen gender_treatment = .
replace gender_treatment = 0 if repos_treatment1 == 1
replace gender_treatment = 0 if repos_treatment2 == 1

replace gender_treatment = 1 if repos_treatment3 == 1
replace gender_treatment = 1 if repos_treatment4 == 1

label define genderlabel 0 "Male Candidate" 1 "Female Candidate" 
label values gender_treatment genderlabel

* Create Repositioning Variable
gen repositioning_treatment = .
replace repositioning_treatment = 0 if repos_treatment2 == 1
replace repositioning_treatment = 0 if repos_treatment4 == 1

replace repositioning_treatment = 1 if repos_treatment1 == 1
replace repositioning_treatment = 1 if repos_treatment3 == 1

label define repositioninglabel 0 "No Repositioning" 1 "Repositioning" 
label values repositioning_treatment repositioninglabel

* Label dependent variables
label var dv1_eval "Evaluation"
label var dv2_trust "Trust"
label var dv3_vote "Vote"
label var posttreat_honest "Honesty"
label var posttreat_decisive "Decisiveness"
label var posttreat_competence "Competence"

* Adapt vote var
gen vote_new = vote
replace vote_new = 99 if vote_new == -99 
replace vote_new = 88  if vote_new == -88 
replace vote_new = 77 if vote_new == -77

* Adapt leftright var
gen left_right_new = left_right
replace left_right_new = . if left_right_new == -99 

* Adapt polinterest var
gen pol_interest_new = pol_interest
replace pol_interest_new = . if pol_interest_new == -99 

* Adapt income var 
gen income_new = income
replace income_new = . if income_new == -88
replace income_new = . if income_new == -99

gen income_new2 = income
replace income_new2 = 88 if income == -88
replace income_new2 = 99 if income == -99

*Set these vars numeric
encode age_6_set, gen(age_6_set_new)
encode edu_3_set, gen(edu_3_set_new)

* Create attention check variable
gen attention = 0
replace attention = 1 if screener2_3 == 1 & screener2_5 == 1

* Create manipulation check variable
gen manipulation = 0
replace manipulation = 1 if (repos_check1 == 1 & repositioning_treatment == 1 | repos_check1 == 2 & 	repositioning_treatment == 0) & (repos_check2 == 1 & gender_treatment == 0 | repos_check2 == 2 & gender_treatment == 1)

*label attention and manipulation
label var attention "Attentive"
label var manipulation "Manipulation Successful"

*gen salience var
gen salience = (issue_importance_child + issue_importance_climate + issue_importance_immi) / 3
label var salience "Issue Importance"

xtile salience_tertile = salience, nq(3)

gen employment_new = employment
replace employment_new = 88 if employment == -88

tabulate age_6_set_new, gen(age_grp)
tabulate edu_3_set_new, gen(edu_grp)
tabulate vote_new, gen(vote_grp)
tabulate salience_tertile, gen(sal_grp)
tabulate employment, gen(emp_grp)
tabulate income, gen(inc_grp)

label var age_grp1 "Age: 18-24"
label var age_grp2 "Age: 25-34"
label var age_grp3 "Age: 35-44"
label var age_grp4 "Age: 45-54"
label var age_grp5 "Age: 55-64"
label var age_grp6 "Age: 65+"

label var edu_grp1 "Education: Low"
label var edu_grp2 "Education: Middle"
label var edu_grp3 "Education: High"

label var sal_grp1 "Importance: Low"
label var sal_grp2 "Importance: Middle"
label var sal_grp3 "Importance: High"

label var emp_grp1 "Employment: No Answer"
label var emp_grp2 "Employment: Fulltime"
label var emp_grp3 "Employment: Parttime"
label var emp_grp4 "Employment: Self-Employed"
label var emp_grp5 "Employment: Unemployed (1)"
label var emp_grp6 "Employment: Unemployed (2)"
label var emp_grp7 "Employment: Household"
label var emp_grp8 "Employment: Retired"
label var emp_grp9 "Employment: Student"
label var emp_grp10 "Employment: Unfit for Work"

label var inc_grp1 "Income: Don't Know"
label var inc_grp2 "Income: No Answer"
label var inc_grp2 "Income: Prefer not to say"
label var inc_grp3 "Income: < €500"
label var inc_grp4 "Income: €501-€1000"
label var inc_grp5 "Income: €1001-€1500"
label var inc_grp6 "Income: €1501-€2000"
label var inc_grp7 "Income: €2001-€2500"
label var inc_grp8 "Income: €2501-€3000"
label var inc_grp9 "Income: €3001-€3500"
label var inc_grp10 "Income: €3501-€4500"
label var inc_grp11 "Income: €4501-€7500"
label var inc_grp12 "Income: > €7500"

label var vote_grp1 "Vote: N-VA"
label var vote_grp2 "Vote: Vlaams Belang"
label var vote_grp3 "Vote: CD\&V"
label var vote_grp4 "Vote: Open Vld"
label var vote_grp5 "Vote: Vooruit"
label var vote_grp6 "Vote: Groen"
label var vote_grp7 "Vote: PVDA"
label var vote_grp8 "Vote: Other party"
label var vote_grp9 "Vote: Blank vote"
label var vote_grp10 "Vote: Did not vote"
label var vote_grp11 "Vote: Not eligible"
label var vote_grp12 "Vote: Prefer not to say"
label var vote_grp13 "Vote: Don't know"

label var gender "Gender"
label define gendervarlabel 1 "Male" 2 "Female" 
label drop labels2
label values gender gendervarlabel


**********************************************
*************** Main Analysis ****************
**********************************************

* Install estout for estimate export
ssc install estout, replace

*************** Main Model ****************

eststo clear
eststo: reg dv1_eval i.gender_treatment i.repositioning_treatment 
eststo: reg dv2_trust i.gender_treatment i.repositioning_treatment 
eststo: reg dv1_eval i.gender_treatment##i.repositioning_treatment 
eststo: reg dv2_trust i.gender_treatment##i.repositioning_treatment
esttab, b(3) se(3) nobaselevels label

esttab using "main_models_gender.tex", replace  ///
 b(3) se(3) label nobaselevels nonumbers ///
 booktabs  ///
 title("The effect of candidate gender and repositioning on candidate reputation\label{tab1}")   
 
 
 *************** Main Model with dv3_vote ****************

eststo clear
eststo: reg dv1_eval i.gender_treatment i.repositioning_treatment 
eststo: reg dv2_trust i.gender_treatment i.repositioning_treatment
eststo: reg dv3_vote i.gender_treatment i.repositioning_treatment 
 eststo: reg dv1_eval i.gender_treatment##i.repositioning_treatment 
eststo: reg dv2_trust i.gender_treatment##i.repositioning_treatment
eststo: reg dv3_vote i.gender_treatment##i.repositioning_treatment

esttab, b(3) se(3) nobaselevels label

esttab using "main_models_gender_dv1_dv2_dv3.tex", replace  ///
 b(3) se(3) label nobaselevels nonumbers ///
 booktabs  ///
 title("The effect of candidate gender and repositioning on candidate reputation\label{main_model	}")   

*************** Coefficient plot all DVs ****************
* Install coefplot for coefficient plots
ssc install coefplot, replace

quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment
estimates store m1
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment 
estimates store m2
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment
estimates store m3
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment
estimates store m4
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment
estimates store m5
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment 
estimates store m6

* Install Scheme 'Schemepack'
ssc install schemepack, replace

coefplot m1 m2 m3 m4 m5 m6, drop(_cons) xline(0) coeflabels(1.gender_treatment = "Female Candidate" 1.repositioning_treatment = "Repositioning" 1.gender_treatment#1.repositioning_treatment = "Female x Repositioning", wrap(20)) yscale(lstyle(none)) legend(position(3) col(1))   ///
     p1(label(Evaluation) pstyle(p1) msymbol(S) )       ///
	 p2(label(Trust) pstyle(p2) msymbol(D) )       ///
	 p3(label(Vote) pstyle(p3) msymbol(T) )       ///
	 p4(label(Honesty) pstyle(p4) msymbol(+) )       ///
	 p5(label(Decisiveness) pstyle(p5) msymbol(O) )       ///
     p6(label(Competence)  pstyle(p6) msymbol(X) )
 	 
**********************************************
********** Analysis for Appendix *************
**********************************************

******** A.1 ********

**** Descriptive statistics for Table A.1
bysort gender_treatment  : sum dv1_eval
bysort repositioning_treatment  : sum dv1_eval
bysort gender_treatment  : sum dv2_trust
bysort repositioning_treatment  : sum dv2_trust
bysort gender_treatment  : sum dv3_vote
bysort repositioning_treatment  : sum dv3_vote

******** A.3 ********

**** Crosstabs for Table A.2
tab gender
tab gender [aweight= weight_reposposthoc]
tab age_6_set
tab age_6_set [aweight= weight_reposposthoc]
tab edu_3_set
tab edu_3_set [aweight= weight_reposposthoc]

**** Models for Table A.3 
eststo clear
eststo: quietly reg dv1_eval i.gender_treatment i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg dv2_trust i.gender_treatment i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg dv3_vote i.gender_treatment i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg posttreat_honest i.gender_treatment i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg posttreat_decisive i.gender_treatment i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg posttreat_competence i.gender_treatment i.repositioning_treatment [pweight=weight_reposposthoc] 

esttab, b(3) se(3) stats(r2) nobaselevels label nonumbers
esttab using "new_weighted_models_gender_h1.tex", replace  ///
 b(3) se(3) stats(r2) label nobaselevels nonumbers  ///
 booktabs  ///
 title("The effect of candidate gender and repositioning on candidate reputation with poststratification weights\label{tab:weights2_h1}")   
  
**** Models for Table A.4
eststo clear
eststo: quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment [pweight=weight_reposposthoc]
eststo: quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment [pweight=weight_reposposthoc] 

esttab, b(3) stats(r2) se(3) nobaselevels label nonumbers
esttab using "new_weighted_models_gender.tex", replace  ///
 b(3) se(3) stats(r2) label nobaselevels nonumbers ///
 booktabs  ///
 title("The effect of candidate gender and repositioning on candidate reputation with stringent poststratification weights\label{tab1}")   

******** A.4 ********

**** Fig A.2 
quietly reg dv1_eval i.gender_treatment i.repositioning_treatment
estimates store m1
quietly reg dv2_trust i.gender_treatment i.repositioning_treatment 
estimates store m2
quietly reg dv3_vote i.gender_treatment i.repositioning_treatment
estimates store m3
quietly reg posttreat_honest i.gender_treatment i.repositioning_treatment
estimates store m4
quietly reg posttreat_decisive i.gender_treatment i.repositioning_treatment
estimates store m5
quietly reg posttreat_competence i.gender_treatment i.repositioning_treatment 
estimates store m6

* Install Scheme 'Blindschemes'
ssc install blindschemes, replace

set scheme plotplain

coefplot m1 m2 m3 m4 m5 m6, drop(_cons) xline(0) coeflabels(, wrap(20)) yscale(lstyle(none)) legend(position(6) rows(2)) ///
     p1(label(Evaluation) pstyle(p1) msymbol(S) )       ///
	 p2(label(Trust) pstyle(p2) msymbol(D) )       ///
	 p3(label(Vote) pstyle(p3) msymbol(T) )       ///
	 p4(label(Honesty) pstyle(p4) msymbol(+) )       ///
	 p5(label(Decisiveness) pstyle(p5) msymbol(O) )       ///
     p6(label(Competence)  pstyle(p6) msymbol(X) )

graph export "fig_a2.png", replace
	 
**** Fig A.3 
estimates clear
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if gender == 1
estimates store m1male
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if gender == 1
estimates store m2male
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if gender == 1
estimates store m3male
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if gender == 1
estimates store m4male
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if gender == 1
estimates store m5male
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment  if gender == 1
estimates store m6male
 
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if gender == 2
estimates store m1f
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if gender == 2
estimates store m2f
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if gender == 2
estimates store m3f
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if gender == 2
estimates store m4f
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if gender == 2
estimates store m5f
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment if gender == 2
estimates store m6f

set scheme plotplainblind
coefplot (m1male, label(Evaluation)) (m2male, label(Trust)) (m3male, label(Vote)) (m4male, label(Honesty)) (m5male, label(Decisiveness)) (m6male, label(Competence)), bylabel(Male Sample) ///
	|| (m1f, label(Evaluation)) (m2f, label(Trust)) (m3f, label(Vote)) (m4f, label(Honesty)) (m5f, label(Decisiveness)) (m6f, label(Competence)), bylabel(Female Sample) ///
	drop(_cons) xline(0) coeflabels(, wrap(20)) yscale(lstyle(none)) legend(position(6) rows(2)) 
graph export "fig_malefemale_gender.png", replace

**** Fig A.4 
estimates clear
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if salience_tertile == 1
estimates store m1ls
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if salience_tertile == 1
estimates store m2ls
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if salience_tertile == 1
estimates store m3ls
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if salience_tertile == 1
estimates store m4ls
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if salience_tertile == 1
estimates store m5ls
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment  if salience_tertile == 1
estimates store m6ls
 
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if salience_tertile == 3
estimates store m1hs
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if salience_tertile == 3
estimates store m2hs
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if salience_tertile == 3
estimates store m3hs
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if salience_tertile == 3
estimates store m4hs
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if salience_tertile == 3
estimates store m5hs
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment if salience_tertile == 3
estimates store m6hs

set scheme plotplainblind
coefplot (m1ls, label(Evaluation)) (m2ls, label(Trust)) (m3ls, label(Vote)) (m4ls, label(Honesty)) (m5ls, label(Decisiveness)) (m6ls, label(Competence)), bylabel(Low Issue Importance) ///
	|| (m1hs, label(Evaluation)) (m2hs, label(Trust)) (m3hs, label(Vote)) (m4hs, label(Honesty)) (m5hs, label(Decisiveness)) (m6hs, label(Competence)), bylabel(High Issue Importance) ///
	drop(_cons) xline(0) coeflabels(, wrap(20)) yscale(lstyle(none)) legend(position(6) rows(2)) 
graph export "fig_salience_gender.png", replace

******** A.5 ********

**** Table A.5 
estimates clear
eststo: quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment i.attention
eststo: quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment i.attention
eststo: quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment i.attention
eststo: quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment i.attention
eststo: quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment i.attention
eststo: quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment i.attention

esttab, b(3) se(3) stats(r2) nobaselevels label nonumbers
esttab using "attention_models_gender.tex", replace  ///
 b(3) se(3) stats(r2) label nobaselevels nonumbers ///
 booktabs  ///
 title("The effect of candidate gender and repositioning on candidate reputation controlling for attentiveness\label{tab1}")  
 
**** Table A.6 
eststo clear
eststo: quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment i.manipulation
eststo: quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment i.manipulation
eststo: quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment i.manipulation
eststo: quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment i.manipulation
eststo: quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment i.manipulation
eststo: quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment i.manipulation

esttab, b(3) se(3)  nobaselevels label nonumbers
esttab using "manipulation_models_gender.tex", replace  ///
 b(3) se(3) stats(r2) label nobaselevels nonumbers ///
 booktabs  ///
 title("The effect of candidate gender and repositioning on candidate reputation controlling for succeeding of the manipulation check\label{tab1}")   
 
**** Figure A.5 
estimates clear 
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if attention == 1
estimates store m1a
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if attention == 1
estimates store m2a
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if attention == 1
estimates store m3a
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if attention == 1
estimates store m4a
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if attention == 1
estimates store m5a
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment  if attention == 1
estimates store m6a 
 
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if attention == 0
estimates store m1na
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if attention == 0
estimates store m2na
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if attention == 0
estimates store m3na
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if attention == 0
estimates store m4na
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if attention == 0
estimates store m5na
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment if attention == 0
estimates store m6na 

set scheme plotplainblind
coefplot (m1a, label(Evaluation)) (m2a, label(Trust)) (m3a, label(Vote)) (m4a, label(Honesty)) (m5a, label(Decisiveness)) (m6a, label(Competence)), bylabel(Attentive Sample) ///
	|| (m1na, label(Evaluation)) (m2na, label(Trust)) (m3na, label(Vote)) (m4na, label(Honesty)) (m5na, label(Decisiveness)) (m6na, label(Competence)), bylabel(Non-Attentive Sample) ///
	drop(_cons) xline(0) coeflabels(, wrap(20)) yscale(lstyle(none)) legend(position(6) rows(2)) 
graph export "fig_attention_gender.png"
 
**** Figure A.6
estimates clear 
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if manipulation == 1
estimates store m1m
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if manipulation == 1
estimates store m2m
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if manipulation == 1
estimates store m3m
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if manipulation == 1
estimates store m4m
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if manipulation == 1
estimates store m5m
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment  if manipulation == 1
estimates store m6m
 
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment if manipulation == 0
estimates store m1nm
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment  if manipulation == 0
estimates store m2nm
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment  if manipulation == 0
estimates store m3nm
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment  if manipulation == 0
estimates store m4nm
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment  if manipulation == 0
estimates store m5nm
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment if manipulation == 0
estimates store m6nm

set scheme plotplainblind
coefplot (m1m, label(Evaluation)) (m2m, label(Trust)) (m3m, label(Vote)) (m4m, label(Honesty)) (m5m, label(Decisiveness)) (m6m, label(Competence)), bylabel(Manipulation Successful) ///
	|| (m1nm, label(Evaluation)) (m2nm, label(Trust)) (m3nm, label(Vote)) (m4nm, label(Honesty)) (m5nm, label(Decisiveness)) (m6nm, label(Competence)), bylabel(Manipulation Unsuccessful) ///
	drop(_cons) xline(0) coeflabels(, wrap(20)) yscale(lstyle(none)) legend(position(6) rows(2)) 
graph export "fig_manipulation_gender.png"
 
******** A.6 ********

**** Figure A.7
estimates clear
quietly reg dv1_eval i.gender_treatment##i.repositioning_treatment i.gender i.edu_3_set_new i.salience_tertile i.age_6_set_new i.income_new i.vote_new
estimates store m1
quietly reg dv2_trust i.gender_treatment##i.repositioning_treatment i.gender i.edu_3_set_new i.salience_tertile i.age_6_set_new i.income_new i.vote_new 
estimates store m2
quietly reg dv3_vote i.gender_treatment##i.repositioning_treatment i.gender i.edu_3_set_new i.salience_tertile i.age_6_set_new i.income_new i.vote_new
estimates store m3
quietly reg posttreat_honest i.gender_treatment##i.repositioning_treatment i.gender i.edu_3_set_new i.salience_tertile i.age_6_set_new i.income_new i.vote_new
estimates store m4
quietly reg posttreat_decisive i.gender_treatment##i.repositioning_treatment i.gender i.edu_3_set_new i.salience_tertile i.age_6_set_new i.income_new i.vote_new
estimates store m5
quietly reg posttreat_competence i.gender_treatment##i.repositioning_treatment i.gender i.edu_3_set_new i.salience_tertile i.age_6_set_new i.income_new i.vote_new
estimates store m6

set scheme plotplain
coefplot (m1, label(Evaluation)) (m2, label(Trust)) (m3, label(Vote)) (m4, label(Honesty)) (m5, label(Decisiveness)) (m6, label(Competence)), drop(_cons *.gender *.edu_3_set_new *.salience_tertile *.age_6_set_new *.income_new *.vote_new) xline(0) coeflabels(, wrap(20)) yscale(lstyle(none))
graph export "fig_unbalancedcov_gender.png"

* Install balancetable for balance tables
ssc install balancetable

**** Balance Tables for Gender Treatment ****

**** Table A.7
balancetable gender_treatment gender age_grp1 age_grp2 age_grp3 age_grp4 age_grp5 age_grp6 edu_grp1 edu_grp2 edu_grp3 sal_grp1 using "balance_gender_trt_1.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")  replace 

**** Table A.8
balancetable gender_treatment  emp_grp1 emp_grp2 emp_grp3 emp_grp4 emp_grp5 emp_grp6 emp_grp7 emp_grp8 emp_grp9 emp_grp10 using "balance_gender_trt_2.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")   replace 

**** Table A.9
balancetable gender_treatment inc_grp1 inc_grp2 inc_grp3 inc_grp4 inc_grp5 inc_grp6 inc_grp7 inc_grp8 inc_grp9 inc_grp10 inc_grp11 inc_grp12 sal_grp1 sal_grp2 sal_grp3 using "balance_gender_trt_3.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")  replace 

**** Table A.10
balancetable gender_treatment  vote_grp1 vote_grp2 vote_grp3 vote_grp4 vote_grp5 vote_grp6 vote_grp7 vote_grp8 vote_grp9 vote_grp10 vote_grp11 vote_grp12 vote_grp13 using "balance_gender_trt_4.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")  replace 

**** Balance Tables for Repositioning Treatment ****

**** Table A.11
balancetable repositioning_treatment gender age_grp1 age_grp2 age_grp3 age_grp4 age_grp5 age_grp6 edu_grp1 edu_grp2 edu_grp3 using "balance_repos_trt_1.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")   replace 

**** Table A.12
balancetable repositioning_treatment emp_grp1 emp_grp2 emp_grp3 emp_grp4 emp_grp5 emp_grp6 emp_grp7 emp_grp8 emp_grp9 emp_grp10 using "balance_repos_trt_2.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")   replace 

**** Table A.13
balancetable repositioning_treatment inc_grp1 inc_grp2 inc_grp3 inc_grp4 inc_grp5 inc_grp6 inc_grp7 inc_grp8 inc_grp9 inc_grp10 inc_grp11 inc_grp12 sal_grp1 sal_grp2 sal_grp3 using "balance_repos_trt_3.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")  replace 

**** Table A.14
balancetable repositioning_treatment  vote_grp1 vote_grp2 vote_grp3 vote_grp4 vote_grp5 vote_grp6 vote_grp7 vote_grp8 vote_grp9 vote_grp10 vote_grp11 vote_grp12 vote_grp13 using "balance_repos_trt_4.tex", varlabels starlevels(* 0.5 ** 0.01 *** 0.001) ctitles("Control group" "Treatment group" "Difference")  replace
